#include <GameTime.hh>

GameTime::GameTime()
{
    this->_Clock = new sf::Clock();
    this->_TotalClock = new sf::Clock();
}

GameTime::~GameTime()
{

}

void    GameTime::UpdateElapsedTime()
{
    this->_ElapsedGameTime = this->_Clock->GetElapsedTime();
    this->_Clock->Reset();
}

void    GameTime::UpdateTotalGameTime()
{
    this->_TotalGameTime = this->_TotalClock->GetElapsedTime();
}

Time    GameTime::ElapsedGameTime(void)
{
    return this->_ElapsedGameTime;
}

void    GameTime::ElapsedGameTime(Time newElapsedGameTime)
{
    this->_ElapsedGameTime = newElapsedGameTime;
}

bool    GameTime::IsRunningSlowly(void)
{
    return this->_IsRunningSlowly;
}

void    GameTime::IsRunningSlowly(bool newIsRunningSlowly)
{
    this->_IsRunningSlowly = newIsRunningSlowly;
}

Time    GameTime::TotalGameTime(void)
{
    return this->_TotalGameTime;
}

void    GameTime::TotalGameTime(Time newTotalGameTime)
{
    this->_TotalGameTime = newTotalGameTime;
}
